package com.ant.storage.controller;

import com.ant.storage.common.ResultPage;
import com.ant.storage.pojo.BusinessEnter;
import com.ant.storage.service.IBusinessEnterService;
import com.ant.storage.common.PageRecv;
import com.ant.storage.common.ResultVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/businessEnter")
@Api(tags = "业务入库接口")
public class BusinessEnterController {

    @Autowired
    IBusinessEnterService businessEnterService;

    @ApiOperation(value = "业务入库单新增")
    @PostMapping("/addBusinessEnter")
    public ResultVo addBusinessEnter(@RequestBody BusinessEnter businessEnter) throws NoSuchFieldException {
        return businessEnterService.addBusinessEnter(businessEnter);
    }

    @ApiOperation(value = "业务入库单查询")
    @PostMapping("/queryBusinessEnter")
    public ResultPage queryBusinessEnter(@RequestBody PageRecv<BusinessEnter>pageRecv){
        return businessEnterService.queryBusinessEnter(pageRecv);
    }
}
